﻿@{
    ViewBag.Title = ViewBag.title == "" ? "云清园博客" : ViewBag.title;
    Layout = "~/Views/Shared/LayoutIndex.cshtml";
}

<div class="doc-container" id="doc-container">
    <div class="container-fixed">
        <div class="col-content" style="width:100%">
            <div class="inner">
                <article class="article-list">
                    <input type="hidden" value="BlogTypeID" id="blogtypeid" />
                    <section class="article-item">                       
                        <div class="bdsharebuttonbox share" data-tag="share_1">
                            <ul>
                                <li class="f-praise"><span><a class="s-praise"></a></span></li>
                                <li class="f-weinxi"><a class="s-weinxi" data-cmd="weixin"></a></li>
                                <li class="f-sina"><a class="s-sina" data-cmd="tsina"></a></li>
                                <li class="f-qq" href="#"><i class="fa fa-qq"></i></li>
                                <li class="f-qzone"><a class="s-qzone" data-cmd="qzone"></a></li>
                            </ul>
                        </div>
                        <div class="f-cb"></div>
                        <div class="mt20 f-fwn fs-24 fc-grey comment" style="border-top: 1px solid #e1e2e0; padding-top: 20px;">
                        </div>
                        <fieldset class="layui-elem-field layui-field-title">
                            <legend>发表评论</legend>
                            <div class="layui-field-box">
                                <div class="leavemessage" style="text-align:initial">
                                    <form class="layui-form blog-editor" action="">
                                        <input type="hidden" name="articleid" id="articleid" value="ID">
                                        <div class="layui-form-item">
                                            <textarea name="editorContent" lay-verify="content" id="remarkEditor" placeholder="请输入内容" class="layui-textarea layui-hide"></textarea>
                                        </div>
                                        <div class="layui-form-item">
                                            <button class="layui-btn" lay-submit="formLeaveMessage" lay-filter="formLeaveMessage">提交留言</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </fieldset>
                        <ul class="blog-comment" id="blog-comment"></ul>
                    </section>
                </article>
            </div>
        </div>
    </div>
</div>
<footer class="grid-footer">
    <div class="footer-fixed">
        <div class="copyright">
            <div class="info">
                <div class="contact">
                    <a href="javascript:void(0)" class="github" target="_blank"><i class="fa fa-github"></i></a>
                    <a href="#" class="qq" target="_blank"><i class="fa fa-qq"></i></a>
                    <a href="#" class="email" target="_blank"><i class="fa fa-envelope"></i></a>
                    <a href="javascript:void(0)" class="weixin"><i class="fa fa-weixin"></i></a>
                </div>
                <p class="mt05">
                    Copyright &copy; 2019-2020 ZQ博客 All Rights Reserved V.3.1.3 Power by ZQ博客
                </p>
            </div>
        </div>
    </div>
</footer>
<script type="text/javascript">
    //做重定向，每个子页面都要判断，如果不是正常跳转到该页面，则返回主页或者上一个页面
    //做发布文章页面  或者  文章详情评论
    $(function () {
        $.ajax({
            url: "/Home/GetArticleList?ArticleId=@ViewBag.id",
            type: "get",
            datatype: "json",
            success: function (data) {
                var data = JSON.parse(data);
                var str = "";
                str += '<aside class="title" style="line-height:1.5;">' + '<h4>' + data.ArticleTitle + '</h4>' +
                    '<p class="fc-grey fs-14">' + '<small>' + '作者：<a href="javascript:void(0)" target="_blank" class="fc-link">'
                + data.UserName + '</a>' + '</small>' + '<small class="ml10">围观群众：<i class="readcount">' +
                data.ViewTimes + '</i></small>' + '<small class="ml10">更新于 <label> ' + data.CRT_Time +
                '</label> </small>' + '</p>' + '</aside>' + '<div class="time mt10" style="padding-bottom:0;">' +
                    '<span class="day">' + data.Day + '</span>' + '<span class="month fs-18">' + data.Month +
                    '<small class="fs-14">月</small></span>' + '<span class="year fs-18">' + data.Year + '</span>' + '</div>'
                + '<div class="content artiledetail" style="border-bottom: 1px solid #e1e2e0; padding-bottom: 20px;">' +
                    data.Content + '<div class="copyright mt20">' + '<p class="f-toe fc-black">非特殊说明，本文版权归 云清个人博客 所有，转载请注明出处.'
                    + '</p>' + '<p class="f-toe">本文标题：' + '<a href="javascript:void(0)" class="r-title">' + data.ArticleTitle
                    + '</a>' + '</p>' + '<p class="f-toe">' + '本文网址：' + '<a href="#">http://www.gqy.com</a>' +
                    '</p>' + '</div>' + '<div id="aplayer" style="margin:5px 0"></div>' + '<h6>延伸阅读</h6>' +
                    '<ol class="b-relation"></ol></div>';

                $(".article-item").prepend(str);
            }
        });
    })
    
    //点击率
    $(function () {
        $.ajax({
            url: "/Home/GetInsertView?ArticleId=@ViewBag.id",
            type: "get",
            datatype: "json",
            success: function (data) {               
                if(data.type)
                {
                    console.log("\u002f\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u000d\u000a\u0020\u002a\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u000d\u000a\u0020\u002a\u0020\u0009\u0009\u6e05\u4e91\u56ed\u7248\u6743\u6240\u6709\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u000d\u000a\u0020\u002a\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0020\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u0009\u000d\u000a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002a\u002f");
                }
                else {
                    layer.msg('点击率出错！', { icon: 5 });
                }
            }
        });
    })
</script>